IF EXISTS(SELECT * FROM SYSOBJECTS WHERE name = 'DegreeCourses' AND xtype = 'U')
BEGIN
	DROP TABLE DegreeCourses
END
GO

IF NOT EXISTS(SELECT * FROM SYSOBJECTS WHERE name = 'DegreeCourses' AND xtype = 'U')
BEGIN
	CREATE TABLE DegreeCourses
	(
		DegreeCourseId				int not null IDENTITY(1,1),
		Nome				varchar(100) not null,
		CoordinatorDegreeCourseId	int not null,
		SemestersQuantity		int not null
	)
END
GO

IF NOT EXISTS(SELECT * FROM SYSOBJECTS WHERE name = 'pk_DegreeCourseId' AND xtype = 'PK')
BEGIN
	ALTER TABLE DegreeCourses
	ADD CONSTRAINT pk_DegreeCourseId PRIMARY KEY ([DegreeCourseId])
END
GO